package com.test.selenium.util;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class SmokeTestTimeStamp {
	private boolean debugMode = true;
	
//	private String date1;
	private String currenttime;
//	private String time2;
	
	private String availableDate;
	private String receivedDate;
	private String departureDate;
	private String arrivalDate;
	private String closeDate;
	private String recoverDate;
	private String departureDate2;
	private String arrivalDate2;
	private String closeDate2;
	private String recoverDate2;
	private String deliverDate;
	
	private String availableTime;
	private String receivedTime;
	private String departureTime;
	private String arrivalTime;
	private String closeTime;
	private String recoverTime;
	private String deliverTime;
	
    public SmokeTestTimeStamp() {
    	SimpleDateFormat dateFormat = new SimpleDateFormat("dd-MMM-yyyy");
    	
    	   Calendar currentDate = Calendar.getInstance();
    	   SimpleDateFormat formatter= new SimpleDateFormat("dd-MMM-yyyy");
    	   //Present Date
    	   currentDate.add(Calendar.DAY_OF_MONTH, -1);
    	   String Todaydate = formatter.format(currentDate.getTime());
    	   //Past Date
    	   currentDate.add(Calendar.DAY_OF_MONTH, -1);
    	   String Pastdate = formatter.format(currentDate.getTime());
    	   //Future Date
    	   currentDate.add(Calendar.DAY_OF_MONTH, +2);
    	   String Futuredate = formatter.format(currentDate.getTime());
    	   
	      if (debugMode) {
	    	  
	    	  System.out.println("Past date ="+Pastdate); 
	    	  System.out.println("Today date =" + Todaydate); 
	    	  System.out.println("Future date ="+Futuredate); 
	      }
    	     	
    	//date1 = dateFormat.format(new Date());
    	  
    	 //Current Time
    	SimpleDateFormat timeFormat = new SimpleDateFormat("HH:mm");
    	currenttime = timeFormat.format(new Date());
    	//   //Arrival date
//    	    SimpleDateFormat ArrivaldateFormat = new SimpleDateFormat(("dd-MMM-yyyy").replace("dd", "dd"+1));
//    	    String date2 = ArrivaldateFormat.format(new Date ());
    	  //Arrival time
//        SimpleDateFormat ArrivaltimeFormat = new SimpleDateFormat(("HH:mm").replace("HH", "23"));
//    	//SimpleDateFormat ArrivaltimeFormat = new SimpleDateFormat(("HH:mm"));
//        time2 = ArrivaltimeFormat.format(new Date ());
        
        availableDate = Pastdate;
        receivedDate= Pastdate;
        departureDate= Pastdate;
        arrivalDate= Todaydate;
        closeDate = Todaydate;
        recoverDate = Todaydate;
        departureDate2= Todaydate;
        arrivalDate2= Futuredate;
        closeDate2 = Futuredate;
        recoverDate2 = Futuredate;
        deliverDate= Futuredate;
        
        availableTime = currenttime;
        receivedTime= currenttime;
        departureTime= currenttime;
        arrivalTime= currenttime;
        closeTime = currenttime;
        recoverTime = currenttime;
        deliverTime= currenttime;
    }
    
   public String getAvailableDate() {
    	return this.availableDate;
    }
    public String getReceivedDate() {
    	return this.receivedDate;
    }
    
    public String getArrivalDate() {
    	return this.arrivalDate;
    }
    public String getDepartureDate() {
    	return this.departureDate;
    }
    public String getCloseDate() {
    	return this.closeDate;
    }
    public String getRecoverDate() {
    	return this.recoverDate;
    }
    public String getArrivalDate2() {
    	return this.arrivalDate;
    }
    public String getDepartureDate2() {
    	return this.departureDate;
    }
    public String getCloseDate2() {
    	return this.closeDate;
    }
    public String getRecoverDate2() {
    	return this.recoverDate;
    }
    public String getDeliverDate() {
    	return this.deliverDate;
    }
    public String getAvailableTime() {
    	return this.availableTime;
    }
    
	 public String getReceivedTime() {
	 	return this.receivedTime;
	 }
	 
	 public String getArrivalTime() {
	 	return this.arrivalTime;
	 }
	 public String getDepartureTime() {
	 	return this.departureTime;
	 }
	 public String getCloseTime() {
	 	return this.closeTime;
	 }
	 public String getRecoverTime() {
	 	return this.recoverTime;
	 }
	 public String getDeliverTime() {
	 	return this.deliverTime;
	 }
}
